home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok31.lha
/
SysRequest
/
SysRequest.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
2KB
|
78 lines
(*---------------------------------------------------------------------------
:Program. SysRequest.def
:Contents. Leitet System-Requester und eigene auf eigenen Screen um
:Author. Bernd Preusing
:Address. Gerhardstr. 16 D-2200 Elmshorn
:Phone. 04121/22486
:Copyright. Public Domain
:Language. Modula-2
:Translator. M2Amiga V3.2e
:History. V1.0 08-Oct-89 Bernd Preusing
:Bugs. none
---------------------------------------------------------------------------*)
IMPLEMENTATION MODULE SysRequest;
FROM SYSTEM IMPORT ADR, CAST, ADDRESS, INLINE;
IMPORT Arts, Intuition, Exec, Dos;
VAR
MyProcess: Dos.ProcessPtr;
OldWindow: Intuition.WindowPtr;
(* $R- $V- $F- *)
PROCEDURE SetReqWindow(Win:Intuition.WindowPtr);
BEGIN
MyProcess^.windowPtr:=Win;
END SetReqWindow;
(* Sheiß Arts Requester geht nur auf WBScreen!! *)
PROCEDURE Requester(header,body,pos,neg:ADDRESS):BOOLEAN;
PROCEDURE DummyText; (* $E- *)
BEGIN INLINE( 0001H, 0100H, 0,0, 0,0, 0,0, 0,0)
END DummyText;
PROCEDURE InitIText(VAR i:Intuition.IntuiText; left,top:INTEGER; adr:ADDRESS);
BEGIN
Exec.CopyMem(ADR(DummyText),ADR(i),SIZE(i));
WITH i DO
leftEdge:=left; topEdge:=top; iText:=adr
END;
END InitIText;
VAR
BodyText1,BodyText2, NegText, PosText: Intuition.IntuiText;
PosPtr: Intuition.IntuiTextPtr;
Height: INTEGER;
BEGIN
InitIText(BodyText1,12,5,header);
Height:=54;
IF body#NIL THEN
InitIText(BodyText2,12,16,body);
BodyText1.nextText:=ADR(BodyText2);
Height:=65;
END;
InitIText(NegText,6,3,neg);
IF pos=NIL THEN
PosPtr:=NIL
ELSE
InitIText(PosText,6,3,pos);
PosPtr:=ADR(PosText);
END;
RETURN Intuition.AutoRequest(MyProcess^.windowPtr,ADR(BodyText1),PosPtr,
ADR(NegText),
Intuition.IDCMPFlagSet{},Intuition.IDCMPFlagSet{},320,Height)
END Requester;
PROCEDURE ClearReqWindow;
BEGIN
MyProcess^.windowPtr:=OldWindow;
END ClearReqWindow;
BEGIN
MyProcess:=CAST(Dos.ProcessPtr,Exec.FindTask(NIL));
OldWindow:=MyProcess^.windowPtr;
Arts.TermProcedure(ClearReqWindow);
END SysRequest.mod